package com.jp.knowledge.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;

import com.jp.knowledge.R;
import com.jp.knowledge.adapter.team_circle.TeamCircleAdapter;
import com.jp.knowledge.comm.JpApplication;
import com.jp.knowledge.model.TeamCircleModel;
import com.jp.knowledge.my.base.RecycleVHolder;

import java.util.List;

/**
 * Created by 528787067@qq.com on 2017/2/17.
 */

public class SearchTeamCircleAdapter extends TeamCircleAdapter {

    public SearchTeamCircleAdapter(Context context, @NonNull List<TeamCircleModel> list) {
        super(context, list);
    }

    @Override
    public void onBind(RecycleVHolder holder, int position) {
        super.onBind(holder, position);
        String title = mList.get(position).getTitle();
        if(title != null && title.trim().length() > 0) {
            holder.setTextView(R.id.team_circle_content, title);
            holder.get(R.id.team_circle_content).setVisibility(View.VISIBLE);
        } else {
            holder.get(R.id.team_circle_content).setVisibility(View.GONE);
        }
        holder.get(R.id.team_circle_more).setVisibility(View.GONE);
        holder.get(R.id.team_circle_delete).setVisibility(View.GONE);
    }
}
